<div class="form-group">
<label for="<?php echo $id; ?>" class="control-label"><?php echo $label; ?></label>
<div class="controls">
	<select name="<?php echo $name; ?>" class="<?php echo $class; ?>" id="<?php echo $id; ?>" <?php echo $attribute; ?>>
		<?php //print_r($value);
            foreach ($value as $key => $val) {
                if (isset($default_value) && ((is_array($default_value)  && in_array($key,$default_value)) || (!is_array($default_value) && $key == $default_value)))
                    echo '<option value="' . $key . '" selected="selected">' . $val . '</option>';
                else
                    echo '<option value="' . $key . '">' . $val . '</option>';
            }
            ?>
	</select>
</div>
</div>
